package com.hyts.distlock.config;

/**
 * project-name:coffice-toolbox
 * package-name:com.hyts.distlock.config
 * author:Libo/Alex
 * create-date:2019-05-11 00:21
 * copyright:libo-hyts-github
 * email:libo2dev@aliyun.com
 * description:此类主要用于: 锁相关的静态配置常量
 */
public interface LockConfig {

    String DEFAULT_CONNECTION_HOST = "127.0.0.1";

    Integer DEFAULT_CONNECTION_PORT = 6379;

    /********************base lock config **************************/

    String LOCK_PREFIX = "lock";

    Long LOCK_EXPIRE_TIME_OUT = 30*60L;

    Long LOCK_REQUIRE_TIME_OUT = 10L;

    /********************Redis distribute lock config **************************/

    String LOCK_REDIS_PREFIX = LOCK_PREFIX+":redis:";

    int REDIS_CONNECTION_TIMEOUT = 5;

    int REDIS_DATABASE_NO = 10;

    /********************zookeeper distribute lock config **************************/

    String LOCK_METADATA = "/zkdslock";

    String LOCK_SPLIT_TOKEN = "-";

    String LOCK_ZOOKEEPER_PREFIX = "/"+LOCK_PREFIX+"/zookeeper";

    int ZOOKEEPER_CONNECTION_TIMEOUT  = 6;

    /****************************config*********************************************/

    String DEFAULT_JEDIS_PROPERTIES = "jedis.properties";

}
